/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/coupon_main.tpl");
    require("./assets/css/coupon_main.css");

    //business

    //component
    var couponSubnavComp = require("./component/couponSubnavComp");
    var couponGridComp = require("./component/couponGridComp");
//    var welfareFormComp = require("./component/welfareFormComp");
    //constant

    //handler

    //store

    var welfareconsupon_main = ELView.extend({
        attrs: {
            template: template
        },
        initComponent: function (params, widget) {
        	couponSubnavComp.initComponent(params, widget);
        	couponGridComp.initComponent(params, widget);
        },
        afterInitComponent: function (params, widget) {
        	 widget.get("subnav").load("servicePoint",{
             	callback: function(ret){
             		widget.get("grid").refresh();
             	}
             })
        }
    });

    module.exports = welfareconsupon_main;
});
